package com.bwie.parkdemo.mvvm.ui.activity;

import android.util.Log;

import com.bwie.lib_core.mvvm.base.BaseActivity;
import com.bwie.parkdemo.BR;
import com.bwie.parkdemo.R;
import com.bwie.parkdemo.databinding.ActivityAddrepairBinding;
import com.bwie.parkdemo.mvvm.viewmodel.AddRepairViewModel;

import org.greenrobot.eventbus.EventBus;
import org.greenrobot.eventbus.Subscribe;
import org.greenrobot.eventbus.ThreadMode;

public class AddRepairActivity extends BaseActivity<ActivityAddrepairBinding,AddRepairViewModel> {

    @Override
    public int initLayout() {
        return R.layout.activity_addrepair;
    }

    @Override
    public void initView() {
        EventBus.getDefault().register(this);
        v.setClicklistener(vm.listener);
        v.setEntity(vm.bindEntity);
    }

    @Override
    protected void onDestroy() {
        EventBus.getDefault().unregister(this);
        super.onDestroy();
    }

    @Subscribe(threadMode = ThreadMode.MAIN)
    public void opencamara(String str){
        vm.addImgPath("/sdcard/timg1.jpg");
    }
    @Override
    public int initVariable() {
        return BR.vm;
    }
}
